/**
 * 
 */
package com.wbcs.jbsf.dao;

import java.sql.Connection;

import com.wbcs.config.Config;

/**
 * JBSF数据源管理器
 * @author hawkfly
 */
public class DataSourceManager
{
    private final static DataSourceManager INSTANCE=new DataSourceManager();
    public static DataSourceManager getInstance(){
        return INSTANCE;
    }
    public Connection getConnection(){
        //return Config.getInstance().getDataSource("ds_oracle").getConnection();
    	String defaultds = Config.getInstance().getDefault_datasourcename();
    	System.out.println("系统默认数据源是: " + defaultds);
    	return Config.getInstance().getDataSource(defaultds).getConnection();
    }
}

